/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.thread;

import java.util.Date;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/9 21:33
 */
public class Main {
    public static void main(String[] args) throws Exception {
        MyThread thread1 = new MyThread();
        System.out.println(new Date().getTime());
        thread1.run();
        System.out.println(new Date().getTime());
        thread1.start();
        RunnableThread thread2 = new RunnableThread();
        // 需要用Thread类来构造，只有Thread类才有start方法
        Thread thread = new Thread(thread2);
        thread.start();
        CallableThread call = new CallableThread();
        Object call1 = call.call();
        System.out.println(call1);
    }
}
